<template>
  <div class="sidebar">
    <!-- 导航菜单 -->
    <div class="nav-menu">
      <router-link to="/user" class="sidebar-item">
        <i class="fas fa-users"></i>
        <span>用户管理</span>
      </router-link>
      
      <router-link to="/heritage" class="sidebar-item">
        <i class="fas fa-landmark"></i>
        <span>文化遗产管理</span>
      </router-link>

      <router-link to="/architecture" class="sidebar-item">
        <i class="fas fa-building"></i>
        <span>古建筑保护</span>
      </router-link>

      <router-link to="/message" class="sidebar-item">
        <i class="fas fa-comments"></i>
        <span>留言管理</span>
      </router-link>

      <router-link to="/legal" class="sidebar-item">
        <i class="fas fa-gavel"></i>
        <span>法律咨询</span>
      </router-link>

      <router-link to="/donation" class="sidebar-item">
        <i class="fas fa-hand-holding-heart"></i>
        <span>捐赠管理</span>
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  name: 'SideBar'
}
</script>

<style scoped>
/* 侧边栏整体样式 */
.sidebar {
  position: fixed;
  left: 0;
  top: 60px;
  bottom: 0;
  width: 250px;
  background-color: #2c3e50;
  padding: 1rem;
  color: white;
  z-index: 1000;
}

/* 导航菜单样式 */
.nav-menu {
  margin-top: 0;
  margin-bottom: 2rem;
  padding-top: 1rem;
}

/* 菜单项样式 */
.sidebar-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  margin: 0.5rem 0;
  border-radius: 8px;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
}

/* 菜单项悬停效果 */
.sidebar-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* 菜单项图标样式 */
.sidebar-item i {
  margin-right: 1rem;
  width: 20px;
  text-align: center;
}

/* 菜单项文字样式 */
.sidebar-item span {
  font-size: 0.9rem;
  font-weight: 500;
}

/* 当前选中项样式 */
.sidebar-item.router-link-active {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
  /* 小屏幕时侧边栏样式 */
  .sidebar {
    width: 70px;
    padding: 1rem;
  }

  /* 小屏幕时隐藏文字 */
  .sidebar-item span {
    display: none;
  }

  /* 小屏幕时图标样式 */
  .sidebar-item i {
    margin-right: 0;
    width: 20px;
  }
}
</style>
